
CREATE TABLE daycare.Medications
  (
   MedicationId INT NOT NULL
                    IDENTITY(1,1)
                    PRIMARY KEY
 , MedicationName VARCHAR(100) NOT NULL
  )

CREATE TABLE daycare.ChildMedications
  (
   ChildMedicationId INT NOT NULL
                         IDENTITY(1,1)
                         PRIMARY KEY
 , ChildId INT NOT NULL
 , MedicationId INT NOT NULL
 , Dosage VARCHAR(100) NOT NULL
  )
ALTER TABLE daycare.ChildMedications ADD CONSTRAINT FK_ChildMedications_Medications FOREIGN KEY (MedicationId) REFERENCES daycare.Medications(MedicationId)
ALTER TABLE daycare.ChildMedications ADD CONSTRAINT FK_ChildMedications_Children FOREIGN KEY (ChildId) REFERENCES daycare.Children(ChildId)
GO